/**
 * Project Name:fire-industry-DM-center
 * File Name:ConstantServer.java
 * Package Name:com.firestone.web.rest
 * Date:2018年3月29日上午10:31:26
 *
*/

package com.firestone.web.rest;

import java.util.List;

import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.firestone.bean.dto.ReturnDTO;
import com.firestone.bean.vo.ConstantVO;
import com.firestone.converters.ConverterConstant;
import com.firestone.core.constants.ConstantMapKey;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * @Description: TODO(常量控制器)
 * @author CAIYJ
 * @date 2018年3月29日 上午10:31:26
 */
@Api(value = "常量控制器", tags = { "常量接口文档 " })
@RestController
@RequestMapping(value = "/constant")
public class ConstantServer {

    /**
     * @Description: TODO(产业园类型)
     * @return
     * @author CAIYJ
     * @date 2018年4月11日 下午4:34:34
     * @lastModifier CAIYJ
     */
    @ApiOperation(value = "产业园类型", notes = "产业园类型", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @RequestMapping(value = "/mapType")
    public ReturnDTO<List<ConstantVO>> mapType() {
        return ReturnDTO
                .success(ConverterConstant.mapToBean(ConstantMapKey.MAP_TYPE));
    }

    /**
     * @Description: TODO(是否医健类型)
     * @return
     * @author CAIYJ
     * @date 2018年4月11日 下午4:34:34
     * @lastModifier CAIYJ
     */
    @ApiOperation(value = "是否医健类型", notes = "是否医健类型", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @RequestMapping(value = "/isMedical")
    public ReturnDTO<List<ConstantVO>> isMedical() {
        return ReturnDTO.success(
                ConverterConstant.mapToBean(ConstantMapKey.IS_MEDICAL));
    }

    /**
     * @Description: TODO(国内外类型)
     * @return
     * @author CAIYJ
     * @date 2018年4月11日 下午4:34:34
     * @lastModifier CAIYJ
     */
    @ApiOperation(value = "国内外类型", notes = "国内外类型", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @RequestMapping(value = "/isNative")
    public ReturnDTO<List<ConstantVO>> isNative() {
        return ReturnDTO
                .success(ConverterConstant.mapToBean(ConstantMapKey.IS_NATIVE));
    }

    /**
     * @Description: TODO(产业园类型)
     * @return
     * @author CAIYJ
     * @date 2018年4月11日 下午4:34:24
     * @lastModifier CAIYJ
     */
    @ApiOperation(value = "系统资源", notes = "系统资源库表-1：DM菜单；2：终端菜单；...；10：资源URL", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @RequestMapping(value = "/resourceType")
    public ReturnDTO<List<ConstantVO>> resourceType() {
        return ReturnDTO.success(ConverterConstant
                .mapToBean(ConstantMapKey.IM_CENTER_RESOURCE_TYPE));
    }
}
